import axios from 'axios';
import { ALL_SERVICE_API } from '../api';
// var qs = require('qs');
// 领头羊收益汇总列表
export const searchTruckBellwetherAcctList = params => {
  return axios.get(ALL_SERVICE_API + '/truck-bellwether-accts', {params: params});
};

// 根据ID获取领头羊收益汇总信息
export const getTruckBellwetherAcctByBellwetherId = (bellwetherId) => {
  return axios.get(ALL_SERVICE_API + '/truck-bellwether-accts/bellwether/' + bellwetherId);
};

// 领头羊收益明细列表
export const searchTruckBellwetherAcctTFlowList = params => {
  return axios.get(ALL_SERVICE_API + '/truck-bellwether-tflows', {params: params});
};

// 平台收益汇总
export const getSumProfitSummary = params => {
  return axios.get(ALL_SERVICE_API + '/truck-bellwether-tflows/sum_profit_summary', {params: params});
};

// 领头羊收益明细可销账统计
export const searchTruckBellwetherAcctTFlowListSum = params => {
  return axios.get(ALL_SERVICE_API + '/truck-bellwether-tflows/sum_truck_bellwether_income', {params: params});
};

// 领头羊收益-销账记录
export const searchTruckBellwetherWriteOffList = params => {
  return axios.get(ALL_SERVICE_API + '/truck-bellwether-write-offs', {params: params});
};

// 领头羊收益明细可销账保存
export const saveTruckBellwetherWriteOff = (params) => {
  return axios.post(ALL_SERVICE_API + '/truck-bellwether-write-offs', params);
};
